<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>controller继承、隔离</title>
		<script src="../org/angular.min.js" ></script>
	</head>
	<body>
		<div ng-app = "hd" ng-controller="ctrl1">
			<input type="text" ng-model="name.data" />
			{{name.data}}
			<div ng-controller="ctrl2">
				
				{{name.data}}
			</div>
		</div> 
		<script>
			var m = angular.module('hd',[]);
			m.controller("ctrl1",['$scope',function($scope){
				 $scope.name={ data:"renren"};
			}]);
			m.controller('ctrl2',['$scope',function($scope){
//				$scope.name="wangwang";
			}])
		</script>
	</body>
</html>
